package modelo;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Cascade;
import org.hibernate.annotations.CascadeType;

@Entity
@Table(name="projeto")
public class Projeto {
	
    @Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private String id;

	private String nome;
	
	@OneToOne
	@JoinColumn(name="area_id")
	private Area area;
	
	// 1 - N
	/*@OneToMany(mappedBy="projeto",fetch = FetchType.EAGER)
	@Cascade(CascadeType.DELETE_ORPHAN)
	private  List<Requisito> requisitos;
	*/
	
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getNome() {
		return nome;
	}
	public void setNome(String nome) {
		this.nome = nome;
	}
	public Area getArea() {
		return area;
	}
	public void setArea(Area area) {
		this.area = area;
	}
	
	/*public List<Requisito> getRequisitos() {
		return requisitos;
	}
	public void setRequisitos(ArrayList<Requisito> requisitos) {
		this.requisitos = requisitos;
	}*/


	
}
